<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
</head>
<body style="padding: 10px">
<div>
    <div class="layui-row">
        <div class="layui-col-xs1">&nbsp;</div>
        <div class="layui-col-xs10">
            <div class="layui-form">
                <div class="layui-row layui-form-item">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">目录名称</label>
                        <div class="layui-input-block">
                            <input name="name" required lay-verify="required" placeholder="请输入名称" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">目录路径</label>
                        <div class="layui-input-block">
                            <input name="uri" required lay-verify="required" placeholder="请输入路径" class="layui-input">
                        </div>
                    </div>
                </div>

                <div class="layui-row layui-form-item">
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">权限标志</label>
                        <div class="layui-input-block">
                            <input id="uri" name="uri" required lay-verify="required" placeholder="请输入权限标志" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-col-xs6">
                        <label class="layui-form-label">目录类型</label>
                        <div class="layui-input-block">
                            <select name="type" lay-verify="required">
                                <option value=""></option>
                                <option value="MENU">目录</option>
                                <option value="ITEM">菜单</option>
                                <option value="BUTTON">按钮</option>
                                <option value="TAB">面板</option>
                            </select>
                        </div>
                    </div>
                </div>

                <div class="layui-row layui-form-item">
                    <div class="layui-col-xs6">
                        <div class="layui-row">
                            <div class="layui-col-xs9">
                                <label class="layui-form-label">目录图标</label>
                                <div class="layui-input-block">
                                    <input name="icon" disabled required lay-verify="required" placeholder="请选择图标" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-col-xs3">
                                <button id="iconChoose" class="layui-btn layui-btn-fluid layui-btn-primary">选择图标</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-xs1">&nbsp;</div>
    </div>
</div>
</body>
<script type="text/javascript" src="../../layui/layui.js"></script>
<script>
    layui.use(['form',], function(){
        init();
    });

    function init () {
        parent.$(document).on('click','#iconChoose',function(){
            var iconChoose = parent.layer.open({
                title: "选择图标",
                area: ['790px', '400px'],
                type: 2,
                content: 'menuSelect.html',
                btn: ['提交', '取消'],
                yes: function(index, layero){
                    parent.layer.msg(iconChoose);
                    parent.layer.close(index);
                },
                btn2: function(index, layero){
                },
                cancel: function(){
                },
                btnAlign: 'c'
            });
        });
    }
</script>
</html>